<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="search" tagdir="/WEB-INF/tags/search"%>
<%@ taglib prefix="probiz" tagdir="/WEB-INF/tags/probiz"%>

<title><fmt:message key="regionList.title" /></title>

<content tag="buttons">
    <probiz:iconBtn btnType="moveUp" onclick="upRegion()" disabled="yes"/>
	<probiz:iconBtn btnType="moveDown" onclick="downRegion()" disabled="yes"/>
	<div class="line"></div>
    <probiz:iconBtn btnType="moveUp" id="moveTop" btnTextKey="common.iconBtn.moveTop" onclick="moveTop()" disabled="yes"/>
    <probiz:iconBtn btnType="moveDown" id="moveBottom" btnTextKey="common.iconBtn.moveBottom" onclick="moveBottom()" disabled="yes"/>
	<div class="line"></div>
	<probiz:iconBtn btnType="add" onclick="createRegion()" disabled="yes"/>
    <probiz:iconBtn btnType="delete" onclick="delRegion()" disabled="yes"/>	
    <probiz:iconBtn btnType="save" onclick="saveRegion();" disabled="yes"/>	
</content>


<div class="tree">
	<div class="tree_wrap">
		<div class="hd"></div>
			<div class="content" id="regionTree" >
				<%@ include file="include/regionTreeBody.jspf"%>
			</div>
		<div class="ft"></div>
	</div>
</div>
<div class="tree_r">
	<div id="regionFormDiv" class="tree_r_wrap">		
		<%--load file="/system/regionForm.jsp" --%>
	</div>
</div>
<%-----start:list需要加载的JS ----%>
<c:set var="plugin_tree" value="true" scope="request"/>
<script type="text/javascript" src="${ctxPath}/scripts/probiz/system/regionList.js?rs=${appConfig.rs}"></script>
<%-----end:  list需要加载的JS ----%>

<%-----start:form需要加载的JS ----%>
<v:javascript formName="region" staticJavascript="false" />
<c:set var="ui_tabs" value="true" scope="request"/>
<script type="text/javascript"	src="${ctxPath}/scripts/probiz/system/regionForm.js?rs=${appConfig.rs}"></script>
<%-----end:  form需要加载的JS ----%>

<script type="text/javascript">
$j(document).ready(function () {
	__FMTExtend = {
		regionDetail_save_successed:"<fmt:message key="regionDetail.save.successed"/>"
	};
	$j.extend(__FMT, __FMTExtend); 
});	


$j(document).ready(function () { 
	jCategoryTree = $j('#regionTree > ul').simpleTree({
		drag:false,
		autoclose:true,
		afterClick:function(node){
			clickTreeItemAction();	
		},
		afterDblClick:function(node){
		},
		afterMove:function(destination, source, pos){
		},
		afterAjax:function()
		{
		},
		animate:true
	})[0];	
	
	activeTreeItem(jCategoryTree,${rootRegion.regionId});
	editRegionForm(${rootRegion.regionId});
});

</script>


